package com.shanghai.shanghaielectric.Model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2017/8/23 0023.
 */

public class SetParameterModel implements Parcelable {
    public int device_pattern;
    public int work_pattern = 0;
    //    String unit_enable_state_3;
    public int reimbursementPattern = 0;
    public int location = 0;
    public int start_pattern = 0;
    public int direction = 0;
    public int ctapf_show = 666;
    public int ctgrid = 1;

    public int Ctload_4 = 0;//高次谐波补偿系数

    public int all_capacity_5 = 0;

//    int external_transformer_ratio_7;//

    public int CT_ratio = 0;

    public int base_wave_phase_Angle_bias_8 = 0;
    public int harmonic_phase_Angle_bias_3__9 = 0;
    public int harmonic_phase_Angle_bias_5__10 = 0;
    public int harmonic_phase_Angle_bias_7__11 = 0;
    public int harmonic_phase_Angle_bias_9__12 = 0;
    public int harmonic_phase_Angle_bias_11__13 = 0;
    public int harmonic_phase_Angle_bias_13__14 = 0;


    //15位 直接计算的数值
    public int sendData_15 = 0;


    public int base_wave_ratio_16 = 0;
    public int harmonic_proportion_3__17 = 0;
    public int harmonic_proportion_5__18 = 0;
    public int harmonic_proportion_7__19 = 0;
    public int harmonic_proportion_9__20 = 0;
    public int harmonic_proportion_11__21 = 0;
    public int harmonic_proportion_13__22 = 0;
    public int harmonic_proportion_15__23 = 0;
    public int harmonic_proportion_17__24 = 0;

    public int overvoltage_protection_26 = 220;
    public int undervoltage_protection_27 = 176;
    public int overcurrent_protection_28 = 100;

    public String harmonic_proportion_19_49__25 = "0000000000000000";

    public SetParameterModel() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.device_pattern);
        dest.writeInt(this.work_pattern);
        dest.writeInt(this.reimbursementPattern);
        dest.writeInt(this.location);
        dest.writeInt(this.start_pattern);
        dest.writeInt(this.direction);
        dest.writeInt(this.ctapf_show);
        dest.writeInt(this.ctgrid);
        dest.writeInt(this.Ctload_4);
        dest.writeInt(this.all_capacity_5);
        dest.writeInt(this.CT_ratio);
        dest.writeInt(this.base_wave_phase_Angle_bias_8);
        dest.writeInt(this.harmonic_phase_Angle_bias_3__9);
        dest.writeInt(this.harmonic_phase_Angle_bias_5__10);
        dest.writeInt(this.harmonic_phase_Angle_bias_7__11);
        dest.writeInt(this.harmonic_phase_Angle_bias_9__12);
        dest.writeInt(this.harmonic_phase_Angle_bias_11__13);
        dest.writeInt(this.harmonic_phase_Angle_bias_13__14);
        dest.writeInt(this.sendData_15);
        dest.writeInt(this.base_wave_ratio_16);
        dest.writeInt(this.harmonic_proportion_3__17);
        dest.writeInt(this.harmonic_proportion_5__18);
        dest.writeInt(this.harmonic_proportion_7__19);
        dest.writeInt(this.harmonic_proportion_9__20);
        dest.writeInt(this.harmonic_proportion_11__21);
        dest.writeInt(this.harmonic_proportion_13__22);
        dest.writeInt(this.harmonic_proportion_15__23);
        dest.writeInt(this.harmonic_proportion_17__24);
        dest.writeInt(this.overvoltage_protection_26);
        dest.writeInt(this.undervoltage_protection_27);
        dest.writeInt(this.overcurrent_protection_28);
        dest.writeString(this.harmonic_proportion_19_49__25);
    }

    protected SetParameterModel(Parcel in) {
        this.device_pattern = in.readInt();
        this.work_pattern = in.readInt();
        this.reimbursementPattern = in.readInt();
        this.location = in.readInt();
        this.start_pattern = in.readInt();
        this.direction = in.readInt();
        this.ctapf_show = in.readInt();
        this.ctgrid = in.readInt();
        this.Ctload_4 = in.readInt();
        this.all_capacity_5 = in.readInt();
        this.CT_ratio = in.readInt();
        this.base_wave_phase_Angle_bias_8 = in.readInt();
        this.harmonic_phase_Angle_bias_3__9 = in.readInt();
        this.harmonic_phase_Angle_bias_5__10 = in.readInt();
        this.harmonic_phase_Angle_bias_7__11 = in.readInt();
        this.harmonic_phase_Angle_bias_9__12 = in.readInt();
        this.harmonic_phase_Angle_bias_11__13 = in.readInt();
        this.harmonic_phase_Angle_bias_13__14 = in.readInt();
        this.sendData_15 = in.readInt();
        this.base_wave_ratio_16 = in.readInt();
        this.harmonic_proportion_3__17 = in.readInt();
        this.harmonic_proportion_5__18 = in.readInt();
        this.harmonic_proportion_7__19 = in.readInt();
        this.harmonic_proportion_9__20 = in.readInt();
        this.harmonic_proportion_11__21 = in.readInt();
        this.harmonic_proportion_13__22 = in.readInt();
        this.harmonic_proportion_15__23 = in.readInt();
        this.harmonic_proportion_17__24 = in.readInt();
        this.overvoltage_protection_26 = in.readInt();
        this.undervoltage_protection_27 = in.readInt();
        this.overcurrent_protection_28 = in.readInt();
        this.harmonic_proportion_19_49__25 = in.readString();
    }

    public static final Creator<SetParameterModel> CREATOR = new Creator<SetParameterModel>() {
        @Override
        public SetParameterModel createFromParcel(Parcel source) {
            return new SetParameterModel(source);
        }

        @Override
        public SetParameterModel[] newArray(int size) {
            return new SetParameterModel[size];
        }
    };
}
